﻿<!DOCTYPE html>
<html>
<head>
    <title>曲线显示-Content</title>
    <link rel="stylesheet" type="text/css" href="../../static/bootstrap-3.3.7/css/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="../../static/bootstrap-3.3.7/css/bootstrap-datetimepicker.min.css" />
    <link rel="stylesheet" type="text/css" href="../../static/bootstrap-3.3.7/css/bootstrap-slider.min.css" />
    <link rel="stylesheet" type="text/css" href="../../static/easyui/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="../../static/easyui/themes/icon.css">
    <link rel="stylesheet" type="text/css" href="../../static/layui/css/layui.css">
    <link rel="stylesheet" type="text/css" href="../../static/font-awesome-4.7.0/css/font-awesome.min.css">

    <script type="text/javascript" src="../../static/js/jquery-2.1.3.min.js"></script>
    <script type="text/javascript" src="../../static/easyui/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="../../static/js/jquery.cookie.js"></script>
    <script type="text/javascript" src="../../static/js/zrender.js"></script>


    <script type="text/javascript" src="../../static/layer/layer.js"></script>
    <script type="text/javascript" src="../../layui/layui.js"></script>
    <script type="text/javascript" src="../../static/bootstrap-3.3.7/js/bootstrap.js"></script>
    <script type="text/javascript" src="../../static/bootstrap-3.3.7/js/bootstrap-datetimepicker.min.js"></script>
    <script type="text/javascript" src="../../static/bootstrap-3.3.7/js/bootstrap-datetimepicker.zh-CN.js"></script>
    <script type="text/javascript" src="../../static/bootstrap-3.3.7/js/moment-with-locales.js"></script>
    <script type="text/javascript" src="../../static/bootstrap-3.3.7/js/bootstrap-slider.min.js"></script>
    <script type="text/javascript" src="../../static/bootstrap-3.3.7/js/BootstrapMenu.min.js"></script>
    <script type="text/javascript" src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
    <script type="text/javascript" src="../../static/js/utils/CommonUtils.js"></script>
    <script type="text/javascript" src="../../static/js/utils/Base64Utils.js"></script>
    <!--自定义js-->
    <script type="text/javascript" src="../../static/js/sxl/curveDisplayContent.js"></script>
    <style>
        #iframeLeft{
            width: 17%;
            height: 700px;
            float: left;
            margin-right: 0.5%;
        }
        #iframeMiddle{
           // width: 73%;
            width: 81%;
            height: 700px;
            margin-right: 0.5%;
        }
        /*#iframeRight{*/
            /*width: 13%;*/
            /*height: 700px;*/
            /*float: right;*/
        /*}*/
    </style>
    <!--注意：EL表达式不能用于js文件中，一般用于jsp文件，但可用于jsp文件中的js代码里！-->
    <script>
        $(document).ready(function () {
            //设置当前台位的primarykey
            //yyi 修改写死
            let topPrimarykey="2017-11-1611:17:211";
            let labcode = "Haierrefrigerator20151214";
           /* let topPrimarykey=top.primarykey;*/
            //获取页面的显示方式（以普通方式显示或以组件方式显示）
            //注意：js中使用el表达式一定要用引号引起来
           /* var tassemblyType="${param.tassemblyType}";
            if(tassemblyType=="tassembly"){ //组件方式请求
                topPrimarykey="${param.primarykey}";
                $.cookie("labcode", "${param.labcode}", { expires: 7, path: '/' });
            }else { //非组件方式请求
                if(topPrimarykey==undefined){
                    topPrimarykey=getUrlRequest()["testdate"];
                }
                $.cookie("labcode", top.labcode,{ expires: 7, path: '/' });
            }*/
            let nowtestunitno=topPrimarykey.charAt(topPrimarykey.length - 1);
            $.cookie("labcode", labcode,{ expires: 7, path: '/' });
            $.cookie("nowtestunitno", nowtestunitno,{ expires: 7, path: '/' });
            $.cookie("nowprimarykey", topPrimarykey,{ expires: 7, path: '/' });
            //控制右侧窗口的显示和隐藏
            $("#iframeRight").on("load", function(event){//判断 iframe是否加载完成  这一步很重要
                $(".right",this.contentDocument).dblclick(function(){
                    $('#iframeRight').css('display','none');
                    //$("#iframeRight").toggle();
                    //浏览器当前窗口可视区域宽度
                    let middlewidth=$(window).width()*0.8;
                    //设置curveDisplay-Middle的宽度
                    $("#iframeMiddle").width(middlewidth);
                });
            });

            //定义全局变量
            window.timeLong="";//总测试时间

            //定义全局json数组,用于存储传感器数据
            window.sensorValues = [];

            window.layerCurse=layer.msg('数据加载中,请稍后', {
                icon: 16,
                shade: 0.4,
                time:false //取消自动关闭
            });
            //1.设置传感器列表-----left
            //此处不能使用jquery
            //放在父页面执行的原因是:保证左侧传感器数据加载完毕后才能绘制曲线
            //document.getElementById('iframeLeft').contentWindow.initSensorList();
            //iframeLeftName.window.getSensorList();
        });
        function startNetStatus(){
            layui.use(['form','element'],function(){
                var element = layui.element;
                var layer = layui.layer;
                var form = layui.form;
                layer.open({
                    type:1,
                    title:"网络状态",
                    area:['53%','90%'],
                    content:$("#netStatus").html(),
                });
                form.render();

            })
        }
    </script>

</head>
<body>
    <iframe id="iframeLeft" name="iframeLeftName" frameborder="0" src="../../html/curveData/curveDisplay-Left.html"></iframe>
    <iframe id="iframeMiddle" name="iframeMiddleName" frameborder="0" src="../../html/curveData/curveDisplay-Middle.html"></iframe>
    <!--<iframe id="iframeRight" name="iframeRight" frameborder="0" src="<%=basePath%>page/CurveDisplayRight"></iframe>-->

</body>
</html>